import java.io.File;
import java.io.IOException;


public class DirIsEmpty {
	public File isfile(String aa,String bb,File file) throws IOException{
		if(file.list().length != 0){
			for (int i=0;i< file.list().length;i++ ){
				File childFile = new File(file+"\\"+file.list()[i]);
				if(childFile.isDirectory()){
					isfile(aa,bb,childFile);
				}
				else{
					System.out.println( childFile + " is file");
				}
			}
			
		}
		else{
			File.createTempFile(aa,bb,file);
		}
		return file;
	}
	public static void 	main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		DirIsEmpty ft = new DirIsEmpty();
		String aa = "abc";
		String bb = "abc";
		String str = args[0];
		File dir =new File(str);
		ft.isfile(aa,bb,dir);
	}
	
}
